<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>老师做的版本：京东左侧导航栏</title>
    <link rel="stylesheet" href="../css.style/reset.css">
    <style>
        /*设置body*/
        body{
            background-color: aqua;
        }
        /*设置菜单外部容器*/
        .left-nav{
            width:190px;
            height:450px;
            /*上下 没有左右*/
            padding:10px 0;
            background-color: #fefefe;
            margin:50px auto;
        }
        /*设置菜单内部的item*/
        .left-nav .item{
            height:25px;
            /*文字在父元素垂直居中，只需将父元素的Line-height设置为和父元素的height一样的值*/
            line-height: 25px;
            /*设置item的左内边距，将文字向右移动*/
            padding-left:18px;
            /*设置/大小*/
            font-size: 12px;
        }
        /*为item设置鼠标移入状态*/
        .item:hover{
            background-color:#d9d9d9;
        }
        
        /*设置超链接的样式*/
        .item a{
            /*设置字体大小*/
            font-size:14px;
            /*设置字体颜色*/
            color:#333;
            /*去除下划线*/
            text-decoration: none;
        }
        /*设置鼠标移入状态*/
        .item a:hover{
            color:#c81623;
        }
    </style>
</head>
<body>
    <nav class="left-nav">
        <div class="item">
            <a href="#">家用电器</a>
        </div>
        <div class="item">
            <a href="#">手机</a>/<a href="#">运营商</a>/<a href="#">数码</a>
        </div>
        <div class="item">
            <a href="#">家用电器</a>
        </div>
        <div class="item">
            <a href="#">手机</a>/<a href="#">运营商</a>/<a href="#">数码</a>
        </div>
        <div class="item">
            <a href="#">家用电器</a>
        </div>
        <div class="item">
            <a href="#">手机</a>/<a href="#">运营商</a>/<a href="#">数码</a>
        </div>
        <div class="item">
            <a href="#">家用电器</a>
        </div>
        <div class="item">
            <a href="#">手机</a>/<a href="#">运营商</a>/<a href="#">数码</a>
        </div>
        <div class="item">
            <a href="#">家用电器</a>
        </div>
        <div class="item">
            <a href="#">手机</a>/<a href="#">运营商</a>/<a href="#">数码</a>
        </div>
        <div class="item">
            <a href="#">家用电器</a>
        </div>
        <div class="item">
            <a href="#">手机</a>/<a href="#">运营商</a>/<a href="#">数码</a>
        </div>
        <div class="item">
            <a href="#">家用电器</a>
        </div>
        <div class="item">
            <a href="#">手机</a>/<a href="#">运营商</a>/<a href="#">数码</a>
        </div>
        <div class="item">
            <a href="#">家用电器</a>
        </div>
        <div class="item">
            <a href="#">手机</a>/<a href="#">运营商</a>/<a href="#">数码</a>
        </div>
        <div class="item">
            <a href="#">家用电器</a>
        </div>
        <div class="item">
            <a href="#">手机</a>/<a href="#">运营商</a>/<a href="#">数码</a>
        </div>
        
    </nav>
    
</body>
</html>